﻿package view
{
    import com.core.*;

    public class DialogControl extends Control
    {

        public function DialogControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "appdialog")
            {
                switch(param2.property)
                {
                    case "open":
                    {
                        DialogMgr.instance.open(param2.newvalue.dialogID, param2.newvalue.data);
                        break;
                    }
                    case "close":
                    {
                        DialogMgr.instance.close(int(param2.newvalue));
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            return;
        }// end function

    }
}
